var async = require("async");
var renderEngin = require("../common/renderEngin");
var cookie = require("../common/cookie");
var Tools = require("../common/tools");
exports.track_search = function(req, res) {
    use(["public/javascripts/track_search/init.js", "public/javascripts/service/track_searchService.js"], function(PageComponent, track_searchService) {
        var userType = cookie.get(req, "userType");
        var storage = {};
        if(!userType) {
            storage["slider"] = Tools.getPageSliderData("track_search");
        } else {
            storage["slider"] = Tools.getPageSliderData("user_center");
        }
        PageComponent = React.createFactory(PageComponent);
        renderEngin.call(res, 'track_search', PageComponent, storage);
    });
}